home *** CD-ROM | disk | FTP | other *** search
/ Enter 2005 October / enter-2005-10.iso / files / jedit42install.exe / {app} / jedit.jar / bsh / commands / exec.bsh < prev    next >
Encoding:
Text File  |  2003-12-27  |  373 b   |  15 lines

  1. /**
  2.     Start an external application using the Java Runtime exec() method.
  3.     Display any output to the standard BeanShell output using print().
  4. */
  5.  
  6. bsh.help.exec = "usage: exec( String arg )";
  7.  
  8. exec( String arg ) 
  9. {
  10.     this.proc = Runtime.getRuntime().exec(arg);
  11.     this.din = new DataInputStream( proc.getInputStream() );
  12.     while( (line=din.readLine()) != null )
  13.         print(line);
  14. }
  15.